<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item><a href="/">权限管理</a></el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card">
      <el-table
        size="small"
        :data="tableData"
        highlight-current-row
        v-loading="loading"
        style="width: 100%" border
        element-loading-text="拼命加载中">
        <el-table-column
          type="index">
        </el-table-column>
        <el-table-column
          prop="authName"
          sortable
          label="权限名称">
        </el-table-column>
        <el-table-column
          prop="path"
          sortable
          label="路径">
        </el-table-column>
        <el-table-column
          prop="level"
          sortable
          label="权限等级">
          <template slot-scope="scope">
            <el-tag v-if="scope.row.level == 0">一级</el-tag>
            <el-tag type="success" v-if="scope.row.level == 1">二级</el-tag>
            <el-tag type="warning" v-if="scope.row.level == 2">三级</el-tag>
          </template>
        </el-table-column>
<!--      <el-table-column-->
<!--        prop="address"-->
<!--        label="操作">-->
<!--        <template slot-scope="scope">-->
<!--          <el-button icon="el-icon-view" size="small">查看</el-button>-->
<!--          <el-button icon="el-icon-edit" size="small">编辑</el-button>-->
<!--          <el-button @click="rowDel(scope.row)" icon="el-icon-delete" size="small">删除</el-button>-->
<!--        </template>-->
<!--      </el-table-column>-->
      </el-table>
    </el-card>
  </div>
</template>
<script>
export default {
  data () {
    return {
      loading: false, //是显示加载
      query: {
        info: ''
      },
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      tableData: [{
        authName: '商品管理',
        path: 'goods',
        level: '0'
      }, {
        authName: '用户管理',
        path: 'users',
        level: '2'
      }, {
        authName: '权限列表',
        path: 'users',
        level: '2'
      }]
    }
  },
  created () {},
  methods: {}
}
</script>

<style lang="less" scoped>
</style>
